using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsDesktopTools._AnalyzePatterns
{
    /// <summary>
    /// <para>Calculate Density</para>
    /// <para>Calculates a magnitude-per-unit area from point features that fall within a neighborhood around each cell.</para>
    /// <para>根据位于每个像元周围邻域内的点要素计算单位面积的量级。</para>
    /// </summary>    
    [DisplayName("Calculate Density")]
    public class CalculateDensity : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateDensity()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_layer">
        /// <para>Input layer</para>
        /// <para>The points that will be used to calculate the density.</para>
        /// <para>将用于计算密度的点。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>A new feature class with calculated densities.</para>
        /// <para>具有计算密度的新要素类。</para>
        /// </param>
        /// <param name="_bin_type">
        /// <para>Bin Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the bin shape that will be used in the analysis.</para>
        ///   <bulletList>
        ///     <bullet_item>Square—The bin shape will be square. This is the default.</bullet_item><para/>
        ///     <bullet_item>Hexagon—The bin shape will be hexagonal.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在分析中使用的箱形。</para>
        ///   <bulletList>
        ///     <bullet_item>正方形—图格形状将为正方形。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>六边形—条柱形状为六边形。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_bin_size">
        /// <para>Bin Size</para>
        /// <para>The size of the bins used to aggregate input features. When generating bins for squares, the number and units specified determine the height and length of the square. For hexagons, the number and units specified determine the distance between parallel sides.</para>
        /// <para>用于聚合输入要素的条柱大小。为正方形生成条柱时，指定的数量和单位决定了正方形的高度和长度。对于六边形，指定的数量和单位决定了平行边之间的距离。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </param>
        /// <param name="_weight">
        /// <para>Weight</para>
        /// <para><xdoc>
        ///   <para>Specifies the weighting to be applied to the density function.</para>
        ///   <bulletList>
        ///     <bullet_item>Uniform—A magnitude-per-area calculation in which each bin is equally weighted. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kernel—A magnitude-per-area calculation with a smoothing algorithm applied (kernel) that weights bins closer to the points more heavily.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要应用于密度函数的权重。</para>
        ///   <bulletList>
        ///     <bullet_item>统一 - 每个图格的权重相等的每面积幅度计算。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>核 - 应用平滑算法（核）的每面积幅度计算，该算法可更重地加权更接近点的图格。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_neighborhood_size">
        /// <para>Neighborhood Size</para>
        /// <para>The search radius to be applied to density calculations.</para>
        /// <para>要应用于密度计算的搜索半径。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </param>
        public CalculateDensity(object _input_layer, object _out_feature_class, _bin_type_value _bin_type, string? _bin_size, _weight_value _weight, string? _neighborhood_size)
        {
            this._input_layer = _input_layer;
            this._out_feature_class = _out_feature_class;
            this._bin_type = _bin_type;
            this._bin_size = _bin_size;
            this._weight = _weight;
            this._neighborhood_size = _neighborhood_size;
        }
        public override string ToolboxName => "GeoAnalytics Desktop Tools";

        public override string ToolName => "Calculate Density";

        public override string CallName => "gapro.CalculateDensity";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "parallelProcessingFactor", "workspace"];

        public override object[] ParameterInfo => [_input_layer, _out_feature_class, _bin_type.GetGPValue(), _bin_size, _weight.GetGPValue(), _neighborhood_size, _fields, _area_unit_scale_factor.GetGPValue(), _time_step_interval, _time_step_repeat, _time_step_reference];

        /// <summary>
        /// <para>Input layer</para>
        /// <para>The points that will be used to calculate the density.</para>
        /// <para>将用于计算密度的点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_layer { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>A new feature class with calculated densities.</para>
        /// <para>具有计算密度的新要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Bin Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the bin shape that will be used in the analysis.</para>
        ///   <bulletList>
        ///     <bullet_item>Square—The bin shape will be square. This is the default.</bullet_item><para/>
        ///     <bullet_item>Hexagon—The bin shape will be hexagonal.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在分析中使用的箱形。</para>
        ///   <bulletList>
        ///     <bullet_item>正方形—图格形状将为正方形。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>六边形—条柱形状为六边形。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bin Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _bin_type_value _bin_type { get; set; }

        public enum _bin_type_value
        {
            /// <summary>
            /// <para>Square</para>
            /// <para>Square—The bin shape will be square. This is the default.</para>
            /// <para>正方形—图格形状将为正方形。这是默认设置。</para>
            /// </summary>
            [Description("Square")]
            [GPEnumValue("SQUARE")]
            _SQUARE,

            /// <summary>
            /// <para>Hexagon</para>
            /// <para>Hexagon—The bin shape will be hexagonal.</para>
            /// <para>六边形—条柱形状为六边形。</para>
            /// </summary>
            [Description("Hexagon")]
            [GPEnumValue("HEXAGON")]
            _HEXAGON,

        }

        /// <summary>
        /// <para>Bin Size</para>
        /// <para>The size of the bins used to aggregate input features. When generating bins for squares, the number and units specified determine the height and length of the square. For hexagons, the number and units specified determine the distance between parallel sides.</para>
        /// <para>用于聚合输入要素的条柱大小。为正方形生成条柱时，指定的数量和单位决定了正方形的高度和长度。对于六边形，指定的数量和单位决定了平行边之间的距离。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Bin Size")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _bin_size { get; set; }


        /// <summary>
        /// <para>Weight</para>
        /// <para><xdoc>
        ///   <para>Specifies the weighting to be applied to the density function.</para>
        ///   <bulletList>
        ///     <bullet_item>Uniform—A magnitude-per-area calculation in which each bin is equally weighted. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kernel—A magnitude-per-area calculation with a smoothing algorithm applied (kernel) that weights bins closer to the points more heavily.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要应用于密度函数的权重。</para>
        ///   <bulletList>
        ///     <bullet_item>统一 - 每个图格的权重相等的每面积幅度计算。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>核 - 应用平滑算法（核）的每面积幅度计算，该算法可更重地加权更接近点的图格。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _weight_value _weight { get; set; }

        public enum _weight_value
        {
            /// <summary>
            /// <para>Kernel</para>
            /// <para>Kernel—A magnitude-per-area calculation with a smoothing algorithm applied (kernel) that weights bins closer to the points more heavily.</para>
            /// <para>核 - 应用平滑算法（核）的每面积幅度计算，该算法可更重地加权更接近点的图格。</para>
            /// </summary>
            [Description("Kernel")]
            [GPEnumValue("KERNEL")]
            _KERNEL,

            /// <summary>
            /// <para>Uniform</para>
            /// <para>Uniform—A magnitude-per-area calculation in which each bin is equally weighted. This is the default.</para>
            /// <para>统一 - 每个图格的权重相等的每面积幅度计算。这是默认设置。</para>
            /// </summary>
            [Description("Uniform")]
            [GPEnumValue("UNIFORM")]
            _UNIFORM,

        }

        /// <summary>
        /// <para>Neighborhood Size</para>
        /// <para>The search radius to be applied to density calculations.</para>
        /// <para>要应用于密度计算的搜索半径。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Neighborhood Size")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _neighborhood_size { get; set; }


        /// <summary>
        /// <para>Fields</para>
        /// <para><xdoc>
        ///   <para>One or more fields denoting population values for each feature. The population field is the count or quantity to be spread across the landscape to create a continuous surface.</para>
        ///   <para>Values in the population field must be numeric. By default, the density of the count of input points will always be calculated.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个或多个字段表示每个要素的总体值。人口字段是要分布在景观中以创建连续表面的计数或数量。</para>
        ///   <para>人口字段中的值必须为数字。默认情况下，将始终计算输入点计数的密度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _fields { get; set; } = null;


        /// <summary>
        /// <para>Area Unit Scale Factor</para>
        /// <para><xdoc>
        ///   <para>Specifies the area units of the output density values. The default unit is based on the units of the output spatial reference.</para>
        ///   <bulletList>
        ///     <bullet_item>Acres—Area in acres</bullet_item><para/>
        ///     <bullet_item>Hectares—Area in hectares</bullet_item><para/>
        ///     <bullet_item>Square miles—Area in square miles</bullet_item><para/>
        ///     <bullet_item>Square kilometers—Area in square kilometers</bullet_item><para/>
        ///     <bullet_item>Square meters—Area in square meters</bullet_item><para/>
        ///     <bullet_item>Square feet—Area in square feet</bullet_item><para/>
        ///     <bullet_item>Square yards—Area in square yards</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出密度值的面积单位。默认单位基于输出空间参考的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>英亩 - 面积（以英亩为单位）</bullet_item><para/>
        ///     <bullet_item>公顷 - 面积（公顷）</bullet_item><para/>
        ///     <bullet_item>平方英里 - 面积（平方英里）</bullet_item><para/>
        ///     <bullet_item>平方公里 - 面积（平方公里）</bullet_item><para/>
        ///     <bullet_item>平方米 - 面积（平方米）</bullet_item><para/>
        ///     <bullet_item>平方英尺 - 面积（以平方英尺为单位）</bullet_item><para/>
        ///     <bullet_item>平方码 - 面积（平方码）</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Unit Scale Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _area_unit_scale_factor_value _area_unit_scale_factor { get; set; } = _area_unit_scale_factor_value._SQUARE_KILOMETERS;

        public enum _area_unit_scale_factor_value
        {
            /// <summary>
            /// <para>Square miles</para>
            /// <para>Square miles—Area in square miles</para>
            /// <para>平方英里 - 面积（平方英里）</para>
            /// </summary>
            [Description("Square miles")]
            [GPEnumValue("SQUARE_MILES")]
            _SQUARE_MILES,

            /// <summary>
            /// <para>Square kilometers</para>
            /// <para>Square kilometers—Area in square kilometers</para>
            /// <para>平方公里 - 面积（平方公里）</para>
            /// </summary>
            [Description("Square kilometers")]
            [GPEnumValue("SQUARE_KILOMETERS")]
            _SQUARE_KILOMETERS,

            /// <summary>
            /// <para>Acres</para>
            /// <para>Acres—Area in acres</para>
            /// <para>英亩 - 面积（以英亩为单位）</para>
            /// </summary>
            [Description("Acres")]
            [GPEnumValue("ACRES")]
            _ACRES,

            /// <summary>
            /// <para>Hectares</para>
            /// <para>Hectares—Area in hectares</para>
            /// <para>公顷 - 面积（公顷）</para>
            /// </summary>
            [Description("Hectares")]
            [GPEnumValue("HECTARES")]
            _HECTARES,

            /// <summary>
            /// <para>Square yards</para>
            /// <para>Square yards—Area in square yards</para>
            /// <para>平方码 - 面积（平方码）</para>
            /// </summary>
            [Description("Square yards")]
            [GPEnumValue("SQUARE_YARDS")]
            _SQUARE_YARDS,

            /// <summary>
            /// <para>Square feet</para>
            /// <para>Square feet—Area in square feet</para>
            /// <para>平方英尺 - 面积（以平方英尺为单位）</para>
            /// </summary>
            [Description("Square feet")]
            [GPEnumValue("SQUARE_FEET")]
            _SQUARE_FEET,

            /// <summary>
            /// <para>Square meters</para>
            /// <para>Square meters—Area in square meters</para>
            /// <para>平方米 - 面积（平方米）</para>
            /// </summary>
            [Description("Square meters")]
            [GPEnumValue("SQUARE_METERS")]
            _SQUARE_METERS,

        }

        /// <summary>
        /// <para>Time Step Interval</para>
        /// <para><xdoc>
        ///   <para>A value that specifies the duration of the time step. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        ///   <para>Time stepping can only be applied if time is enabled on the input.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个值，指定时间步长的持续时间。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        ///   <para>仅当输入上启用了时间时，才能应用时间步进。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_interval { get; set; } = null;


        /// <summary>
        /// <para>Time Step Repeat</para>
        /// <para>A value that specifies how often the time-step interval occurs. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>一个值，该值指定时间步长间隔发生的频率。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Repeat")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_repeat { get; set; } = null;


        /// <summary>
        /// <para>Time Step Reference</para>
        /// <para>A date that specifies the reference time with which to align the time steps. The default is January 1, 1970, at 12:00 a.m. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>指定用于对齐时间步长的参考时间的日期。默认值为 1970 年 1 月 1 日凌晨 12：00。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_reference { get; set; } = null;


        public CalculateDensity SetEnv(object extent = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, workspace: workspace);
            return this;
        }

    }

}